<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>

<script type="text/javascript"  src="js/jquery-easyui-1.5.4.2/jquery.min.js"></script>
<script type="text/javascript"  src="js/jquery-easyui-1.5.4.2/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript"  src="js/jquery-easyui-1.5.4.2/jquery.easyui.min.js"></script>
<link rel="stylesheet" type="text/css"  href="js/jquery-easyui-1.5.4.2/themes/icon.css" />
<link rel="stylesheet" type="text/css"  href="js/jquery-easyui-1.5.4.2/themes/black/easyui.css" />
<link rel="stylesheet" type="text/css"  href="css/llj/CustomerCare_css.css">
<script type="text/javascript" src="js/datagrid-cellediting.js"></script>


<script type="text/javascript">
       
   
    

		
		 
			  $(function(){  
					 var ConnTId='<%=session.getAttribute("ConnectorId") %>';   
					    $("#dg").datagrid({
					    	fit:true,
					        title:'接件工单详情',
					        fitColumns:true,
					        url:'getNeedData',   
					  	  queryParams: {
					  			connectorId: 23    
					  	  },
					        method:'get',
					        singleSelect:true,  
					        rownumbers:true,
					        columns:[[
					        {field:'cc',width:1,checkbox:true},
					        {field:'connector_detail_name',title:'字段名',width:3},
					        {field:'connector_select_getValue',title:'类型',width:3,formatter:function(value){
					        	if(value=="单选按钮"){
					        		return '<input type="checkbox" name="xxx" checked:"true" value='+value+'>';
					        	}else{
					        		 $("#ConnSelect").append("<option value='Value'>Text</option>"); //为Select追加一个Option(下拉项)
					        		return'<select id="ConnSelect" value="uuu" style="width:100px,height:20px"><option>单选按钮</option><option>单行文本框</option><option>下拉多选框</option></select>';     
					        	}
					        	   
					        }},   
					        {field:'connector_select_setValue',title:'参数',width:4}
					        ]],  
					        toolbar: [{
					        	
					            text: '修改', iconCls: 'icon-edit', handler: function () {
					                var row = $("#dg").datagrid("getSelected"); 
					                var rowIndex = $('#dg').datagrid('getRowIndex', row);
					                $('#dg').edatagrid('editRow', rowIndex);     
					               /*  if (row != null) {
					                    if (editRow != undefined) {
					                        $("#dg").datagrid('endEdit', editRow);
					                    }
					 
					                    if (editRow == undefined) {
					                        var index = $("#dg").datagrid('getRowIndex', row);
					                        $("#dg").datagrid('beginEdit', index);
					                        editRow = index;
					                        $("#dg").datagrid('unselectAll');
					                    }
					                } else {
					                } */
					            }
					        },],
					 })             
					});      
			 
			           
	
</script>    

   
<style type="text/css">
.C_Care_vspace_llj {
	margin-top: 15px;
}
</style>
<title>three</title>
</head>   
<body>
      <table id="dg" class="easyui-datagrid"></table>   
          
	 



  
</body>
</html>